import { get, post, del, put } from "@/utils/request";
import {
  type nursingParams,
  type nursingReturn,
  type nursingAddParams,
  type nursingAddData,
} from "./type";

// 护理服务列表
export const nursingList = (data: nursingParams) => {
  return get<nursingParams, nursingReturn>("/api/nursingService/list", data);
};

// 添加
export const nursingAdd = (data: nursingAddParams) => {
  return post<nursingAddParams, nursingAddData>("/api/nursingService/add", data);
};

// 修改
export const nursingUpdate = (data: nursingAddParams) => {
  return put<nursingAddParams, nursingAddData>("/api/nursingService/update", data);
};

// 删除
export const nursingDel = (id: number) => {
  return del<number, null>(`/api/nursingService/delete/${id}`);
};

// 批删
export const nursingDelAll = (data: number[]) => {
  return post<number[], null>("/api/nursingService/deleteAll", data);
};
